package com.zkx.mvp.view;

import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.v7.app.AppCompatActivity;

import butterknife.ButterKnife;

/**
 * Author：zhangkx on 2017/6/16 16:59
 * Email：zkx9025@163.com
 * activity的基类
 */

public abstract class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getContentLayout());
        ButterKnife.bind(this);
        initView();
        initData();
    }

    protected abstract @LayoutRes
    int getContentLayout();
    protected abstract void initView();
    protected abstract void initData();
}
